package com.quan.Config;

import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

public class MQConnection {

    public static Connection getRabbitmaConection(){
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost("192.168.88.8");
        factory.setPort(5672);
        factory.setUsername("lzq");
        factory.setPassword("123456");
        factory.setVirtualHost("/testVirtualHosts");
        Connection conn =null;
        try {
            conn = factory.newConnection();
        }catch (Exception e){

        }

        return conn;
    }
}
